/*
 * ConfigurationDialog.java
 *
 * Created on 5. april 2004, 15:14
 */

package ps2vfs.pluggable.imageconverter;

/**
 *
 * @author  stigpo
 */
public class ConfigurationDialog extends javax.swing.JDialog {
    
    /** Creates new form ConfigurationDialog */
    public ConfigurationDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    private void initComponents() {//GEN-BEGIN:initComponents
        jPanel2 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jWidth = new javax.swing.JTextField();
        jHeight = new javax.swing.JTextField();
        jQuality = new javax.swing.JSpinner();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jList1 = new javax.swing.JList();
        jPanel4 = new javax.swing.JPanel();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        jList2 = new javax.swing.JList();
        jPanel1 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();

        setTitle("Image Converter Plugin Configuration");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                closeDialog(evt);
            }
        });

        jPanel2.setLayout(new java.awt.BorderLayout());

        jPanel2.setMinimumSize(new java.awt.Dimension(200, 200));
        jPanel2.setPreferredSize(new java.awt.Dimension(300, 300));
        jPanel5.setLayout(new javax.swing.BoxLayout(jPanel5, javax.swing.BoxLayout.X_AXIS));

        jPanel5.setAlignmentX(1.0F);
        jPanel5.setMinimumSize(new java.awt.Dimension(109, 41));
        jWidth.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        jWidth.setText("1280");
        jWidth.setToolTipText("Set the maximum width of a picture");
        jWidth.setAlignmentX(0.0F);
        jWidth.setBorder(new javax.swing.border.TitledBorder("Width"));
        jWidth.setMaximumSize(new java.awt.Dimension(100, 41));
        jPanel5.add(jWidth);

        jHeight.setText("1024");
        jHeight.setToolTipText("Maximum height of a picture");
        jHeight.setAlignmentX(0.0F);
        jHeight.setBorder(new javax.swing.border.TitledBorder("Height"));
        jHeight.setMaximumSize(new java.awt.Dimension(100, 41));
        jPanel5.add(jHeight);

        jQuality.setAlignmentX(0.0F);
        jQuality.setBorder(new javax.swing.border.TitledBorder("Quality"));
        jQuality.setMaximumSize(new java.awt.Dimension(100, 41));
        jPanel5.add(jQuality);

        jPanel2.add(jPanel5, java.awt.BorderLayout.NORTH);

        jPanel3.setLayout(new javax.swing.BoxLayout(jPanel3, javax.swing.BoxLayout.X_AXIS));

        jPanel3.setBorder(new javax.swing.border.TitledBorder("Picture formats to auto-convert"));
        jPanel3.setMinimumSize(new java.awt.Dimension(200, 200));
        jPanel3.setPreferredSize(new java.awt.Dimension(200, 200));
        jScrollPane1.setBorder(new javax.swing.border.TitledBorder("Included"));
        jList1.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "test" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jList1.setMaximumSize(new java.awt.Dimension(32000, 32000));
        jScrollPane1.setViewportView(jList1);

        jPanel3.add(jScrollPane1);

        jPanel4.setLayout(new javax.swing.BoxLayout(jPanel4, javax.swing.BoxLayout.Y_AXIS));

        jButton3.setText("=>");
        jPanel4.add(jButton3);

        jButton4.setText("<=");
        jPanel4.add(jButton4);

        jPanel3.add(jPanel4);

        jScrollPane2.setBorder(new javax.swing.border.TitledBorder("Excluded"));
        jList2.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Test", "Test2", "Test3" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jList2.setMaximumSize(new java.awt.Dimension(32000, 32000));
        jScrollPane2.setViewportView(jList2);

        jPanel3.add(jScrollPane2);

        jPanel2.add(jPanel3, java.awt.BorderLayout.CENTER);

        getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER);

        jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.X_AXIS));

        jButton1.setText("OK");
        jPanel1.add(jButton1);

        jButton2.setText("Cancel");
        jPanel1.add(jButton2);

        getContentPane().add(jPanel1, java.awt.BorderLayout.SOUTH);

        pack();
    }//GEN-END:initComponents
    
    /** Closes the dialog */
    private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
        setVisible(false);
        dispose();
    }//GEN-LAST:event_closeDialog
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        new ConfigurationDialog(new javax.swing.JFrame(), true).show();
    }
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JTextField jHeight;
    private javax.swing.JList jList1;
    private javax.swing.JList jList2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JSpinner jQuality;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTextField jWidth;
    // End of variables declaration//GEN-END:variables
    
}
